import Vue from "vue";
import Vuex from "vuex";
import app from "./moudle/app";
import loginStroe from "./moudle/login";
import { removeUserName, removeToKen } from "../utils/app";
Vue.use(Vuex);

export default new Vuex.Store({
  // 相当于vue中的computed 计算属性
  Getters: {},
  actions: {
    exit() {
      return new Promise(resolve => {
        // content.commit("loginStroe/SET_ADMIN_NAME", "");
        // content.commit("loginStroe/SET_ADMIN_TOKEN", "");
        removeToKen();
        removeUserName();
        resolve();
      });
    }
  },
  // 用于对vuex中存储的数据进行同步处理
  modules: {
    app,
    loginStroe
  }
});
